<template>
  <div>
    <div v-if="pageFlag==='shopConfig'" class="qup-page-heade bread-box">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item>门店测绘管理</el-breadcrumb-item>
        <el-breadcrumb-item>详情</el-breadcrumb-item>
      </el-breadcrumb>
      <div>
        <el-button size="mini" @click.native="backConfigDetail">返回</el-button>
      </div>
    </div>

    <c-log-tabs :source-id="id">
      <div class="qup-title-box"><span class="border" /><span>卖场测绘详情</span></div>
      <map-detail :detail-data="detailData.id" />
      <c-list :column="3">
        <c-list-item label="数据来源" dict-type-code="DATA_FROM" :value="detailData.dataSource" />
        <c-list-item label="测绘申请审核结果" dict-type-code="REVIEW_RESULT" :value="detailData.applyReviewResult" />
        <c-list-item label="测绘申请流程实例号" :value="detailData.applyInstanceCode" />
        <c-list-item label="是否有效" :value="detailData.isValid===1?'是':'否'" />
        <c-list-item label="是否测绘超期" dict-type-code="BOOLEANS" :value="detailData.isOuttimeMeasure&&String(detailData.isOuttimeMeasure)" />
        <c-list-item type="textarea" :span="3" label="图纸跟踪专员审核意见" :value="detailData.picTrackReviewAdvice" />
        <c-list-item type="textarea" :span="3" label="领导审核意见汇总" :value="detailData.leadReviewAdviceSum" />
      </c-list>
      <c-section title="测绘数据">
        <map-detail-1 :detail-data="detailData" />
        <c-list-item :span="3" label="测绘资料审核结果" dict-type-code="REVIEW_RESULT" :value="detailData.dataReviewResult" />
        <c-list-item type="textarea" :span="3" label="测绘资料审核意见" :value="detailData.dataReviewAdvice" />
        <!-- <c-list-item :span="3" label="测绘资料审核意见" :value="detailData.dataReviewAdvice" /> -->
      </c-section>
      <c-section title="复尺数据">
        <c-list :column="3">
          <c-list-item label="是否完成复尺" dict-type-code="BOOLEANS" :value="detailData.isFinishResurvey&&String(detailData.isFinishResurvey)" />
          <c-list-item label="不复尺设计摆场" dict-type-code="UNRESURVEY_STATE" :value="detailData.unresurveyDesignSetup" />
          <c-list-item label="不复尺设计施工" dict-type-code="UNRESURVEY_STATE" :value="detailData.unresurveyDesignConst" />
          <c-list-item label="复尺申请人" :value="detailData.resurveyApplicantName" />
          <c-list-item label="复尺申请时间" :value="detailData.resurveyApplyTime" />
          <c-list-item label="复尺申请说明" :value="detailData.resurveyApplyDesc" />
          <c-list-item label="复尺人姓名" :value="detailData.resurveyorName" />
          <c-list-item label="复尺人电话" :value="detailData.resurveyorPhone" />
          <c-list-item label="预计复尺时间" :value="detailData.expectResurveyTime" />
          <c-list-item label="实际复尺时间" :value="detailData.actualResurveyTime" />
          <c-list-item label="本次复尺面积" :value="detailData.currentResurveyArea" />
          <c-list-item type="textarea" :span="3" label="复尺备注" :value="detailData.resurveyorRemark" />
          <c-list-item :span="3" label="复尺资料审核结果" dict-type-code="REVIEW_RESULT" :value="detailData.resurveyReviewResult" />
          <c-list-item type="textarea" :span="3" label="复尺资料审核意见" :value="detailData.resurveyReviewResultDesc" />

        </c-list>
      </c-section>
      <div class="qup-title-box"><span class="border" /><span>附件管理</span></div>
      <file-detail
        style="margin-bottom:20px;margin-top:20px"
        :file-data="fileDataList"
      />
    </c-log-tabs>
  </div>
</template>
<script>
import BackPageMixin from '@/mixins/backPage'
import { getDetailData } from '@/api/shopMap'
import fileDetail from '../fileDetail.vue'
import mapDetail from '../mapDetail.vue'
import mapDetail1 from '../mapDetail1.vue'
import { getShopAttachment } from '@/api/common.js'
import CSection from '../../../../components/CSection/CSection.vue'
export default {
  name: 'MapDetail',
  components: { fileDetail, mapDetail, mapDetail1, CSection },

  mixins: [BackPageMixin],
  props: {
    childrenId: {
      type: String,
      default: ''
    },
    pageFlag: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      id: '',
      activeName: 'first',
      dataLoading: false,
      detailData: {
      },
      fileDataList: [],
      logData: []
    }
  },
  created() {
    this.id = this.$route.query.id || this.childrenId
    if (this.id) {
      this.dataLoading = true
      getShopAttachment(this.id).then(res => {
        this.fileDataList = res.data
      })
      getDetailData(this.id).then(res => {
        if (res.success === 1) {
          this.detailData = res.data
        }
        this.dataLoading = false
      }).catch(() => {
        this.dataLoading = false
      })
    }
  },
  methods: {
    backConfigDetail() {
      this.$emit('goBack', false)
    }
  }
}
</script>
<style lang="scss" scoped>
/deep/ .el-breadcrumb__inner{
    color: $qup-color-primary;
  }
</style>
